<?php
	require_once 'init.php';
	
	$usernc = $_SESSION['unc'];	
	$orderid = $_GET['oid'];
	$itemid = $_GET['id'];
	
	//check operator
	$t = $_GET['t'];
	//submit order
	if ($t == 'submit') {
		$syncid = ((int)($orderid))%10000;
		$adminDB->executeSQL("update ".$util->contentdbName().".tbOrder set fdSubmit=now(), fdStatus = 1, fdSyncID = '".date("yyyymmdd").$syncid."' where id=".$orderid."", $connID);
	}	
	//remove order
	if ($t == 'remove') {		
		$adminDB->executeSQL("update ".$util->contentdbName().".tbOrder set fdStatus = 8 where id=".$orderid."", $connID);
	}
	
	echo "<script>alert('操作成功！');window.location.href='userorder.php';</script>";	
?>